{% set root_passwd = pillar['root_passwd'] %}

changepasswd:
  user.present:
    - name: root
    - password: {{root_passwd}}
    - uid: 0
    - gid: 0

  cmd.run:
    - name: touch /opt/changepasswd.lock
    - unless: test -f /opt/changepasswd.lock
